The country’s political life in the 1990s and 2000s was marked by prolonged instability as the monarchy, the NC, and Maoists jostled for power. Throughout those two decades the government remained largely in the hands of the NC with brief periods of CPN (UML) control. However, the NC’s leadership squabbled frequently, and the premiership alternated between Bhattarai, Koirala, and Sher Bahadur Deuba, another prominent member of the NC. Meanwhile, a group of Maoist rebels emerged in the 1990s and rapidly grew in number and strength and established their own breakaway party, the Communist Party of Nepal (Maoist), or CPN (M). The rebels often used violent tactics to champion the cause of the rural poor and advocated overthrowing the monarchy. By the early 21st century the Maoists not only posed a serious threat to the government but had virtually propelled the country into a state of civil war. The killing in 2001 of the king and most members of the royal family by the crown prince (who also died, from self-inflicted wounds) further heightened tensions, and, after the massacre, Koirala, who was serving his third term as prime minister, was forced to resign. Deuba, who replaced Koirala, initially held negotiations with the CPN (M) to end the war, but, after peace talks broke down months later, he enlisted the help of the United States to suppress the Maoists. The new king, Birendra’s brother Gyanendra, took an active role in defending the monarchy, meanwhile, including imposing direct rule in 2005. After parliament was reinstated in April 2006, Koirala became prime minister for the fourth time. Later that year the government of Nepal and the Maoist insurgency signed a UN-mediated peace accord that provided for temporary representation of the Maoists in the Council of Ministers, restricted the rebel army to camps, and required both the Maoists and the Nepalese army to lock equal amounts of their arms in UN-monitored containers. An interim constitution, which transferred all executive power to the prime minister, was to remain in effect until the weapons management plan had been completed, elections had been held, and a permanent constitution had been drafted to replace the 1990 document. The extent of the duties of the king as head of state was to be determined by an elected constituent assembly, which would also draft a new constitution. Elections for the assembly, originally scheduled for June 2007, were postponed several times, notably after the Maoists pulled out of the government, demanding the immediate dissolution of the monarchy. In December 2007 it was finally agreed that the monarchy would be abolished, and elections were held in April 2008. The Maoists—who changed their party name to the Unified Communist Party of Nepal (Maoist), or UCPN (M), in 2009—won the most seats, and on May 28, 2008, more than two centuries of royal rule came to an end as the new assembly voted to declare Nepal a democratic republic.